feat(helm): add PodDisruptionBudget for controller and UI - #2392
Open
anthonyhaussman wants to merge 1 commit into
Open
feat(helm): add PodDisruptionBudget for controller and UI#2392anthonyhaussman wants to merge 1 commit into
anthonyhaussman wants to merge 1 commit into
Conversation
anthonyhaussman
marked this pull request as ready for review
August 4, 2026 17:41
Opt-in per component via controller.pdb / ui.pdb. Disabled by default because replicas is 1, where a minAvailable:1 budget refuses every voluntary eviction and hangs node drains. Selector reuses kagent.<component>.selectorLabels, the same helper the Deployment spec.selector uses, so a budget cannot drift from the pods it protects. Setting both minAvailable and maxUnavailable, or neither, fails at template time instead of surfacing as an opaque API server error. Assisted-by: Claude Opus 5 Signed-off-by: Anthony Hausman <ahausman@tf1.fr>
anthonyhaussman
force-pushed
the
feat/helm-poddisruptionbudget
branch
from
August 5, 2026 04:55
bf8a604 to
cec8f3f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an opt-in
PodDisruptionBudgetfor the controller and UI Deployments, configured per component viacontroller.pdbandui.pdb.Why these defaults
Disabled by default. Both components default to
replicas: 1, and aminAvailable: 1budget on a single-replica Deployment refuses every voluntary eviction, so node drains and cluster upgrades hang. When enabled, the default ismaxUnavailable: 1, which is safe at any replica count.NOTES.txtwarns at install time whenminAvailable >= replicas, the configuration that deadlocks drains.Selector correctness
The budget selector is rendered from
kagent.<component>.selectorLabels, the same helper the Deploymentspec.selectoralready uses. A budget whose selector does not match the Deployment silently protects nothing, so reusing the helper makes drift impossible rather than merely unlikely.Validation
Kubernetes rejects a PDB with both
minAvailableandmaxUnavailable, and one with neither is meaningless. Both cases now fail at template time with a message naming the offending values path:The set/unset check uses
kindIs "invalid"rather thandefault "", because Helm treats0as empty and would otherwise silently drop amaxUnavailable: 0budget.